import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/form',
    method: 'post',
    params: data,
    auth: {
      username: 'admin',
      password: '$2a$10$3OrhEQjnqw8Bolwc2ZnjR.MaR.jkQK19hvVeeyI2H3PTbk7rFdO3i'
    }
  })
}

export function editPassword(data) {
  return request({
    url: '/admin/editPassword',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/admin/info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/admin/logout',
    method: 'delete'
  })
}

export function test(loginDto) {
  return request({
    url: '/security/login/test',
    method: 'post',
    data: loginDto
  })
}

